-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Add feature to the rust log service to proxy the go log service. #4559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
613c61f
to
a5bd3fa
Compare
51295b2
to
cad8641
Compare
bb3b8b7
to
c9383bd
Compare
5bc99c6
to
324da65
Compare
Rust Log Service Proxy to Go Log Service Implementation This PR introduces a significant integration between the Rust log service and the legacy Go log service, enabling the Rust service to proxy requests to the Go log as part of a hybrid rollout/migration strategy (per rollout ADR). The Rust log service can now forward RPCs such as PushLogs, ScoutLogs, PullLogs, UpdateCollectionLogOffset, and ForkLogs to the Go service if a proxy is configured and the local log state is uninitialized, thereby supporting collection state transitions ('classic', 'transitioning', 'transitioned'). Major updates span code logic, configuration files, and supporting client code for gRPC connectivity. Key Changes: Affected Areas: Potential Impact: Functionality: Critical for staged migration of collections from Go to Rust log service, with seamless request forwarding and log transfer when needed; changes affect core RPC pathing during runtime and impact all log service consumers. Performance: Adds some overhead for proxied requests; performance may be impacted when proxying to the Go log service, especially during migrations or if proxy_to is always active; local operations remain unaffected after migration. Security: No new direct security exposure but introduces dependency on Go log endpoint being secure and properly configured; improper configuration could result in failed log operations. Scalability: Increases system resilience during the migration window by allowing split traffic; system remains as scalable as underlying Go/Rust services. Review Focus: Testing Needed• Test all log-related Code Quality Assessmentrust/log-service/src/lib.rs: Well-structured, with clear separation of proxy and local paths. Correct use of async and error propagation. Some duplicative logic noted as a temporary measure in comments. rust/log/src/grpc_log.rs: Code is clear and documented; the client creation logic is duplicated but noted as a transient hack for this phase of rollout. No major Rust best-practice violations. rust/worker/tilt_config.yaml: Appropriate extension, config structure remains comprehensible. Cargo.lock: Version as expected with chroma-cli. Best PracticesObservability: Migration: Error Handling: Configuration: Potential Issues• Proxy remains optional (Option<...>)-consider hard-fail vs. silent neutral response if config is missing when proxying is expected. This summary was automatically generated by @propel-code-bot |
324da65
to
4c6289d
Compare
) -> Result<Response<PushLogsResponse>, Status> { | ||
let request = request.into_inner(); | ||
if let Some(proxy) = self.proxy.as_ref() { | ||
let resp = proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for my understanding, the go service will continue to be called for every PushLogs invocation, even on migrated collections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on migrated collections. We only get to forward-push-logs if the log isn't initialized.
@@ -630,11 +632,179 @@ pub struct LogServer { | |||
storage: Arc<Storage>, | |||
open_logs: Arc<StateHashTable<LogKey, LogStub>>, | |||
dirty_log: Arc<LogWriter>, | |||
#[allow(clippy::type_complexity)] | |||
proxy: Option<LogServiceClient<chroma_tracing::GrpcTraceService<tonic::transport::Channel>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why is proxy an optional if pretty much every method needs it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the config could be lacking it, so we neutralize rather than hard fail.
7a9ea53
to
dc65e79
Compare
4c6289d
to
55f4aae
Compare
55f4aae
to
93e7d3e
Compare
93e7d3e
to
f1c8390
Compare
f1c8390
to
e4a1e47
Compare
Following the rollout ADR, this will encode table to go classic->transitioning->transitioned. | | **inactive** | **active** | |------------|---------------|--------------| | **open** | classic | BUG | | **sealed** | transitioning | transitioned |
e4a1e47
to
3682d5c
Compare
Description of changes
Following the rollout ADR, this will encode table to go
classic->transitioning->transitioned.
Test plan
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
N/A